﻿/*
 * KLF Headless Browser
 * Written by Kris Oye <kristianoye@gmail.com>
 * Copyright (C) 2011-2012.  All rights reserved.
 */
namespace KLF.Lib.Browser.DOM.HTML
{
    #region Using Statements

    using System;

    #endregion

    /// <summary>
    /// 
    /// </summary>
    public class HTMLLIElement : HTMLElement
    {
        #region Constructors

        internal HTMLLIElement(Document owner)
            : base(owner, HTMLConstants.HTML_TAG_LISTITEM)
        {
        }

        #endregion

        #region DOM Level 2 HTML Compliance

        /// <summary>
        /// List item bullet style. See the type attribute definition in 
        /// HTML 4.01. This attribute is deprecated in HTML 4.01.
        /// </summary>
        public string type
        {
            get
            {
                return getAttribute(HTMLConstants.HTML_ATT_TYPE);
            }
            set
            {
                if (String.IsNullOrEmpty(value))
                    removeAttribute(value);
                else
                    setAttribute(HTMLConstants.HTML_ATT_TYPE, value);
            }
        }

        /// <summary>
        /// Reset sequence number when used in OL. See the value attribute 
        /// definition in HTML 4.01. This attribute is deprecated in 
        /// HTML 4.01.
        /// </summary>
        public int value
        {
            get
            {
                return getAttributeAsType<int>(HTMLConstants.HTML_ATT_VALUE, 1);
            }
            set
            {
                setAttributeAsType<int>(HTMLConstants.HTML_ATT_VALUE, value);
            }
        }

        #endregion
    }
}
